package com.nwpu.am.service.impl;

import com.nwpu.am.mapper.PartMapper;
import com.nwpu.am.pojo.dto.PartFindDTO;
import com.nwpu.am.pojo.entity.Part;
import com.nwpu.am.service.PartService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;

/**
 * PartServiceImpl
 *
 * @author Du
 * @version 1.0
 * {@code @date} 2024/6/5
 */

@Service
@Slf4j
public class PartServiceImpl implements PartService {
    @Resource
    private PartMapper partMapper;

    public ArrayList<Part> findPart(PartFindDTO partFindDTO){
        return partMapper.selectPartByPartFindDTO(partFindDTO);
    }

    @Override
    public ArrayList<Part> display() {

        return partMapper.selectAll();
    }
}
